package cn.me.alphamq.common.entity.req;

import cn.me.alphamq.common.entity.BaseMsg;

/**
 * 推送业务消息的请求对象
 *
 * @author f
 */
public class PushMsgReq extends BaseMsg {

    /**
     * 消息的主题
     */
    private String topic;

    /**
     * 放入消息的队列 id，默认值是 -1，如果没有传递，则会在写入数据时默认写到 0 号队列
     */
    private int queueId;

    /**
     * 消息的主体
     */
    private byte[] body;

    public PushMsgReq() {
    }

    public PushMsgReq(PushDelayMsgReq pushDelayMsgReq) {
        this(pushDelayMsgReq.getTopic(), pushDelayMsgReq.getQueueId(), pushDelayMsgReq.getBody());
    }

    public PushMsgReq(String topic, int queueId, byte[] body) {
        this.topic = topic;
        this.queueId = queueId;
        this.body = body;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public int getQueueId() {
        return queueId;
    }

    public void setQueueId(int queueId) {
        this.queueId = queueId;
    }

    public byte[] getBody() {
        return body;
    }

    public void setBody(byte[] body) {
        this.body = body;
    }
}
